<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:x="https://www.texmacs.org/2002/extensions" xmlns:m="http://www.w3.org/1998/Math/MathML">
  <head>
    <title>TeXmacs notes</title>
    <meta content="TeXmacs 1.99.15" name="generator"></meta>
    <link href="../resources/notes-base.css" type="text/css" rel="stylesheet"></link>
    <link href="../resources/blog-icon.png" rel="icon"></link>
    <script src="../resources/highlight.pack.js" language="javascript" defer></script>
    <script src="../resources/notes-base.js" language="javascript" defer></script>
  </head>
  <body>
    <div class="notes-header">
      <p>
        <img class="image" src="../resources/texmacs-blog-transparent.png" width="28.116784"></img><span style="margin-left: 2pt"></span><a href="./main.html">[main]</a><em
        class="notes-header-name">Notes on TeXmacs</em>
      </p>
    </div>
    <p>
      <a id="auto-1"></a>
    </p>
    <h1>Tetris with TeXmacs tables<span style="margin-left: 1em"></span></h1>
    <p>
      <img class="image" src="../resources/tetris/screenshot.png" width="600"></img>
    </p>
    <p>
      This example is taken from a presentation of Miguel de Benito
    </p>
    <p>
      The TeXmacs source <a href="../resources/tetris/tetris-with-tables.tm">tetris-with-tables.tm</a> loads the scheme
      file <a href="../resources/tetris/tetris-with-tables.scm">tetris-with-tables.scm</a> which defines the procedures
      needed to play tetris. The game surface is implemented via a document
      table and the tiles by changing the color of the cells. This is not the
      most efficient implementation but it is a nice example of several
      features of TeXmacs:
    </p>
    <ul>
      <li>
        <p>
          handle keyboard interaction in a context-dependent way
        </p>
      </li>
      <li>
        <p>
          programmatically modify a document
        </p>
      </li>
      <li>
        <p>
          schedule actions to a later moment
        </p>
      </li>
    </ul>
    <p>
      Enjoy!
    </p>
    <p>
      <i>mgubi</i>
    </p>
  </body>
</html>